This page last changed on Jul 12, 2007 by stepheneb.

Disk images for running CC software on OLPC

Current Task Summary

These are in order of importance:

  • jnlp from browser
  • vernier usb device in windows on Parallels OSX usb kernel extensions
  • vernier driver for CC Sensor library on olpc
  • sound port command on olpc for walter

SoundGrapher on olpc emulator

Hi
I'm trying to understand what's wrong with our java sound activity.

It looks like there is a general problem with sound with Parallels
so it's not our problem.

it looks like I doesn't have any sound (I'm running build 3120) 

csound output: 
Csound version 5.03.1 beta (float samples) Nov 8 2006
ALSA lib pcm hw.c:1357 (snd pcm_hw open) Invalid value for card
*** Cannot open device 'plughw' for audio input: No such device
I was able to run SUN java sound demo on QEMU (Q application)
midi keyboard worked, but our application crashes Java VM
it's not clear what's the reason, because I saw before some java applications wasn't run on Q
but paralleles was ok

Java running on olpc emulator

  • simply install self extracting java
    • I downloaded it locally and use scp to copy it to the emulator
  • it appears to not work after installing java and rebooting, why?
    I was able to install java 1.4.2_13 on OLPC image build 212
    here is what I did
  1. downloaded selfextarcted package from the sun page
  2. in sugar press alt+ctrl+F2 login root
  3. in OLPC created directory /usr/local/java
  4. if there is no network start dhclient
  5. cd /usr/local/java
  6. using scp copy j2re-1_4_2_13-linux-i586.bin file to the /usr/local/java directory
  7. chmod u+x j2re-1_4_2_13-linux-i586.bin
  8. ./j2re-1_4_2_13-linux-i586.bin
  9. rm j2re-1_4_2_13-linux-i586.bin
  10. restart OLPC
    now
    java 1.4. uses deprecated (Fedora > 3) libXp.so library
    so I downloaded xorg-x11-deprecated-libs-6.8.2-37.FC4.49.2.1.i386.rpm from the site http://rpmfind.net/linux/rpm2html/search.php?query=libXp.so.6
    I extracted file libXp.so.6.2 from that package and copied it to the OLPC's
    /usr/lib directory. after that cd /usr/lib and
    finally ln -s libXp.so.6.2 libXp.so.6
    after that go back to the sugar: ctrl-alt-F7
    in the image 212 there is new (I think) application
    developer console (via alt-shift-F12)
    so you can check javawebstart from there and it works just beautifully

Jnlp launching from the olpc webbrowser

  • Figure out how to configure the webbrowser to launch javaws when a *.jnlp file is clicked on. This has been a problem because the browser doesn't download files, or ask about opening those files. And the browser doesn't have a file menu.
  • try to get the folling running http://continuum.concord.org/jnlp/teemss2-snapshot.jnlp
    after installing java 1.4 (see comments from above)
    I was able to run teemss2-snapshot.jnlp file without visible problems
    also I think we should run javaws -Xclearcache before every javaws run

Shrink Java

  • the total size of java after installation is what is important, currently it is around 100MB. Start with getting down to 20MB - I have seen programs that come bundle with a java which is 20MB. But if it can be smaller ~5MB that would be better.
    • Try using genjar to build a minium set of classes: http://genjar.sourceforge.net/
    • if that doesn't work try doing it manually.
    • I read removing unecessary fonts can make a big difference.
      in the java 1.4 installation fonts folder is relatively small ~2.5MB
      (that what du command returns at least)
      the major offenders are rt.jar 25MB
      directory lib/i386/server ~8MB
      and lib/i386/client ~5MB
      lib/plugin.jar ~1.6MB I tried to remove that file and it looks like
      everything was fine.

Results

currently all java install takes 52MB of disk space

du output:
du /usr/local/java
....
51828 /usr/local/java

after removing plugin.jar it became ~50MB

  • I removed lib/i386/server folder (~7.5M)
  • and 2 small folders man and plugin
    concord jnlp works fine
    and size of the java folder is ~41.5M
    original rt.jar has size ~22M
    interesting that rt.jar has uncompressed files
  • so I unjar content of rt.jar
  • and created rt.jar with the command jar cf rt.jar *
    in result I got workable rt.jar with size 11.5M
    so currently java folder has size 29686K
    df output is:
    Filesystem      1K-blocks    Used      Available   Use%    Mounted on
    /def/hda1       476913       398324    73665       85%     /
    
  • after removing com/sun/corba classes
    I got size of the java folder 28891K and I have amount available blocks 74462
  • I removed few fonts from the lib/fonts folder:
    • LucidaBright*.ttf and LucidaTypewriter*.ttf
      it gave us another 1.2MB
  • also I created new rt.jar without java/sql and sun/jdbc
    after jar we have another 0.15MB (not much but still)

additionally I removed these packages

  • /com/sun/java/plaf/gtk
  • /com/sun/java/plaf/windows
    see attachment rt3.jar
    upload it to OLPC image rename to rt.jar and put it to /usr/local/java/j2re.../lib/
    folder (yet another 0.8MB)

Build Vernier Drivers Linux

  • There is a vernier sdk for linux. It needs to be compiled in linux.
  • Update the SensorNative project in CC cvs to work with the compiled vernier drivers for linux

Audio jack a2d sensors

Java Plugin in OLPC Browser


libXp.so.6.2 (application/octet-stream)
rt.jar (application/java-archive)
rt2.jar (application/java-archive)
rt3.jar (application/java-archive)
Document generated by Confluence on Jan 27, 2014 16:43